<form class="form-horizontal" name="form" ng-submit="$modal.ok()">
  <div class="modal-header bg-primary">
    <h3 class="modal-title">Run analysis</h3>
  </div>
  <div class="modal-body">

    <div class="form-group">
      <label class="col-sm-2 control-label">TLP
        <i class="fa fa-asterisk text-danger"></i>
      </label>
      <div class="col-sm-4">
        <select class="form-control" ng-model="$modal.observable.tlp" ng-options="tlp.value as tlp.key for tlp in $modal.Tlps" required></select>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">PAP
        <i class="fa fa-asterisk text-danger"></i>
      </label>
      <div class="col-sm-4">
        <select class="form-control" ng-model="$modal.observable.pap" ng-options="pap.value as pap.key for pap in $modal.Tlps" required></select>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">Data Type
        <i class="fa fa-asterisk text-danger"></i>
      </label>
      <div class="col-sm-4">
        <select class="form-control" ng-model="$modal.observable.dataType" ng-options="dt for dt in $modal.formData.dataTypes"
          required ng-change="$modal.clearData()">
          <option value="">-- choose data type --</option>
        </select>
      </div>
    </div>
    <div class="form-group" ng-show="!$modal.isFile()">
      <label class="col-sm-2 control-label">Data
        <i class="fa fa-asterisk text-danger"></i>
      </label>
      <div class="col-sm-10">
        <input type="text" class="form-control" placeholder="Data: 8.8.8.8, test.com" ng-model="$modal.observable.data" ng-required="!$modal.isFile()">
      </div>
    </div>
    <div class="form-group" ng-show="$modal.isFile()">
      <label class="col-sm-2 control-label">File
        <i class="fa fa-asterisk text-danger"></i>
      </label>
      <div class="col-sm-10">
        <input type="hidden" name="attachment" ng-model="$modal.observable.attachment.status" ng-required="$modal.isFile()">
        <div file-chooser="" filemodel="$modal.observable.attachment"></div>
      </div>
    </div>
    
    <input type="hidden" ng-model="$modal.formData.ids" required>
    
    <div class="form-group" ng-show="$modal.observable.dataType">
      <label class="col-sm-2 control-label">Analyzers
        <i class="fa fa-asterisk text-danger"></i>
      </label>
      <div class="col-sm-10">
        <ul class="nav nav-pills nav-stacked">
          <li ng-repeat="a in $modal.analyzers | filter:{dataTypeList: $modal.observable.dataType}:true">
            <a href ng-click="$modal.toggleAnalyzer(a)">
              <i class="fa text-primary" ng-class="{true: 'fa-check-square' , false: 'fa-square-o'}[a.active]"></i> {{a.name}}
            </a>
          </li>
        </ul>
      </div>
    </div>

  </div>
  <div class="modal-footer">
    <button class="btn btn-default pull-left" type="button" ng-click="$modal.cancel()">Cancel</button>
    <span class="btn pull-left">
      <i class="fa fa-asterisk text-danger"></i>&nbsp;Required field</span>
    <button class="btn btn-primary pull-right" type="submit" ng-disabled="form.$invalid">Start</button>
  </div>
</form>